﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Phone="clr-namespace:C1.Phone;assembly=C1.Phone.8"
    xmlns:local="clr-namespace:jbgswin"
    x:Class="jbgswin.downld"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <local:dituwz x:Key="dituwzDataSource" d:IsDataSource="True"/>
        <DataTemplate x:Key="DataTemplate1">
        	<StackPanel Width="456" Height="40" Orientation="Horizontal">
        		  <TextBlock TextWrapping="Wrap" Text="{Binding nowid}" Width="50"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding name}" Width="130"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding shuoming}" Width="110"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding lx}" Width="90"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding ly}" Width="90"/>
        	</StackPanel>
        </DataTemplate>
        
    </phone:PhoneApplicationPage.Resources>
    <phone:PhoneApplicationPage.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </phone:PhoneApplicationPage.FontFamily>
    <phone:PhoneApplicationPage.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </phone:PhoneApplicationPage.FontSize>
    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="#FF137180" DataContext="{Binding Source={StaticResource dituwzDataSource}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="从云端获取数据" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Phone:C1ProgressBar x:Name="ProgressBar1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,-420,-15" Width="456" Height="50"/>
            <Phone:C1ListBox x:Name="cla1" HorizontalAlignment="Left" Height="500" VerticalAlignment="Top" Width="456" Grid.Row="4" Margin="0,95,0,-240" Background="#FF137180" ItemsSource="{Binding Mode=OneWay}"  ScrollViewer.VerticalScrollBarVisibility="Auto" ItemTemplate="{StaticResource DataTemplate1}"  />
            <StackPanel Height="55" Margin="0,600,0,-300" Width="456" Grid.Row="4" Orientation="Horizontal">
                <Button Content="从服务器端更新" BorderThickness="1" Padding="1" Margin="0,0,0,-2" Click="Button_Click" Height="57" Foreground="#FFAA0493" Width="190"/>
                <Button Content="全部覆盖本地" Margin="100,0,0,0" Width="171" BorderThickness="1" Padding="1" Foreground="#FF0FD82A" Height="57" Click="Button_Click_1"/>
            </StackPanel>
            <StackPanel HorizontalAlignment="Left" Height="44" Margin="0,0,-356,-95" VerticalAlignment="Bottom" Width="456" Grid.Row="2" Orientation="Horizontal">
                <TextBlock TextWrapping="Wrap" Text="当前服务端数据" Width="397"/>
                <TextBlock x:Name="fwqct" TextWrapping="Wrap" Text="*条" Width="58"/>
            </StackPanel>
            <StackPanel Margin="0,0,-420,-52" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Width="456" Height="52" VerticalAlignment="Center">
                <TextBlock TextWrapping="Wrap" Text="当前内存中数据" Width="397" VerticalAlignment="Center" Margin="0,13,0,12"/>
                <TextBlock x:Name="ncct" TextWrapping="Wrap" Text="*条" Width="56" VerticalAlignment="Center" Margin="0,13,0,12" HorizontalAlignment="Right"/>
            </StackPanel>

        </Grid>
    </Grid>

</phone:PhoneApplicationPage>